{% load blog_tag %}
<h2>Search</h2>
<form action="" method="get">
    <table>
        {{ form.as_table }}
        <tr>
            <td></td>
            <td>
                <input type="submit" value="Search">
            </td>
        </tr>
    </table>
    {% if query %}
        <h3>Results</h3>
        {% for result in page.object_list %}
            <p>
                <a href="{{ result.object.get_absolute_url }}">{{ result.object.title }}</a>
            </p>
            <p>{{ result.object.body|my_markdown|truncatewords_html:30 }}</p>
            {% empty %}
            <p>no result in page.object_list</p>
        {% endfor %}
        {% include 'blog_article/pagination.html' with page=page%}
    {% endif %} 
</form>